<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>合同</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../css/oksub.css">
</head>
<body>
<div class="ok-body"> 
  <!--form表单-->
  <form class="layui-form layui-form-pane ok-form">
    <div class="layui-form-item">
      <label class="layui-form-label">模板名称</label>
      <div class="layui-input-block">
        <input type="text" name="title" placeholder="请输入文章标题" autocomplete="off" class="layui-input"
				       lay-verify="required">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">类 别</label>
      <div class="layui-input-block">
        <select name="classify">
          <option value="0">不限</option>
          <option value="1">劳动合同</option>
          <option value="2">租赁合同</option>
          <option value="3">服务合同</option>
          <option value="4">借款担保合同</option>
          <option value="5">委托合同</option>
          <option value="6">采购合同</option>
          <option value="7">买卖合同</option>
          <option value="8">广告合同</option>
          <option value="9">技术合同</option>
          <option value="10">知识产权</option>
          <option value="11">加工承揽</option>
          <option value="12">赠与合同</option>
          <option value="13">居间行级</option>
          <option value="14">保管运输</option>
        </select>
      </div>
    </div>
    <div class="ok-body layui-form-item layui-form-text" style="padding: 0px;">
      <textarea id="editor" style="display: none;">
            <p>欢迎使用 <b>ok-admin v2.0</b></p>
        </textarea>
    </div>
    <div class="layui-form-item ok-body">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="addArticle">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
    </div>
  </form>
</div>
<!--js逻辑--> 
<script src="../../lib/layui/layui.js"></script> 
<script type="text/javascript">
        layui.use(["layedit"], function () {
            let $ = layui.jquery;
            let layedit = layui.layedit;

            let index = layedit.build("editor");

            $("#contentBtn").click(function () {
                alert(layedit.getContent(index));
            });

            $("#textBtn").click(function () {
                alert(layedit.getText(index));
            });

            $("#selectionBtn").click(function () {
                alert(layedit.getSelection(index));
            });
        });
    </script>
</body>
</html>
